package com.bstek.uflo.designer.model.node;

import com.bstek.uflo.designer.utils.ShapeUtils;

public class RectNode extends Node {

	public String getShapeType() {
		return "HTML";
	}

	public String getShapeValue() {
		String icon = "dorado/res/dorado/resources/icons/" + ShapeUtils.getShapeIcon(this);
		return buildHtmlShapeTemplate(icon, this.getName());

	}

	private String buildHtmlShapeTemplate(String icon, String label) {
		String html = "<table width=\"100%\" height=\"40px\" cellspacing=\"0\"\n" + "\tstyle=\"table-layout : fixed; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius:10px;border: 2px #040FB3 solid; background-color: #EBE8E9;\">\n"
				+ "\t<tr >\n" + "\t\t<td style=\"white-space: nowrap; overflow: hidden;\"><div style=\"vertical-align: middle; text-align: center;\">\n" + "\t           <img src=\"" + icon
				+ "\" style=\"vertical-align: middle\" /><span style=\"vertical-align: middle\">" + label + "</span>\n" + "\t\t</div></td>\n" + "\t</tr>\n" + "</table>";
		return html;
	}

}
